<?php if(!IS_AJAX){?>

<include file="Public:header" />
<div class="row">
  <div class="col-sm-7 col-md-8 col-lg-9">
    <section class="panel">
      <div class="panel-body">
        <table class="" width="100%" border="0" cellspacing="0" cellpadding="0">
         
          <tbody class="ajaxdatalist" id="ajaxdatalist">
            <?php }?>
            
            
            
            <?php if(IS_AJAX){?>
            <!-- 数据主体 -->
            
            <volist name="list" id="vo">
            <tr id="ajaxdatalist-{$vo.id}"><td>
  <table width="100%" border="0" class="table table-bordered" cellspacing="0" cellpadding="0" style="box-shadow:2px 2px 4px #ccc; border-radius:4px;">
  <tbody>
    <tr>
      <td colspan="2">订单号：{$vo.ordernumber}&nbsp;&nbsp;&nbsp;下单时间：{:date('Y-m-d H:i:s',$vo['create_time'])}&nbsp;&nbsp;&nbsp;<eq name="vo['status']" value="0">已取消</eq>
    <eq name="vo['status']" value="1">待支付</eq>
    <eq name="vo['status']" value="2">已支付</eq>
    <eq name="vo['shipping_status']" value="0">未发货</eq>
    <eq name="vo['shipping_status']" value="1">部分发货</eq>
    <eq name="vo['shipping_status']" value="2">全部发货</eq>
    <eq name="vo['shipping_status']" value="3">部分确认</eq>
    <eq name="vo['shipping_status']" value="4"><span style="color:#26CB62; font-weight:bold;">全部确认</span></eq>
    <eq name="vo['service_status']" value="1">退货</eq>
    <eq name="vo['service_status']" value="2">换货</eq></td>
    </tr>
    <tr>
      <td colspan="2"><notempty name="vo['yourname']">收货人：{$vo.yourname}　</notempty>会员ID:{$vo.member_id}　<notempty name="vo['nickname']">{$vo.nickname}</notempty><notempty name="vo['tel']">
    <br>
电话：{$vo.tel}
</notempty>
<notempty name="vo['address']">
<br>
地址：{$vo.address}
</notempty>
<notempty name="vo['taxtitle']">
<br>
发票抬头:<span style="color:#f00;">{$vo['taxtitle']}</span>
</notempty>

<p>{$vo.paytypename}</p>

<p>{:getShippingName($vo['shipping_id'])}(<span style="color:#f00; font-weight:bold; font-size:14px;">¥{$vo.shipping_fee}</span>)</p>

<notempty name="vo['Guestbook']">
<p>用户留言：{$vo.Guestbook}</p>
</notempty>





</td>
     
    </tr>
    <tr>
      <td><span style="color:#f00; font-weight:bold; font-size:14px;">¥<span class="ajaxText" tablename="Order" field="total" id="{$vo.id}" val="{$vo.total}" >{$vo.total}</span></span>
    
    
    <gt name="vo['coupon_sn_id']" value="0">
        <p>使用优惠券：{$vo.coupon_sn_id}(<span style="color:#f00;">¥{$vo['coupon_total']}</span>)</p>
    </gt>
    
    
    
    <div class="pull-right"><neq name="vo['confirm']" value="1">
      <eq name="vo['status']" value='2'>
        <a href="{:U('Order/confirm',array('id'=>$vo['id']))}" class="btn btn-primary btn-sm" >确认</a>　
      </eq>
    </neq><eq name="vo['status']" value="1"> <a href="" class="btn btn-primary btn-sm" data-toggle="modal" data-target="#myModal"  style="font-size:12px;" onClick=" document.getElementById('order_id').value={$vo.id}" >付款</a> 　
     </eq><a href="javascript:void(0);" onClick="_openWindow('{:U('Order/edit',array('id'=>$vo['id']))}', 800, '查看订单', '保存', null, '');" class="btn btn-primary btn-sm" >查看</a>　<a href="javascript:void(0);" class="btn btn-danger btn-sm deleteBtn" data-id="{$vo.id}" rel="{:U('delete', array('id' => $vo['id']))}">删除</a>
    
    <!-- 退款审核确认 -->
      <if condition="$vo.status eq 6">
        <a href="{:U('refund',array('id'=>$vo['id']))}" class="btn btn-primary btn-sm" >退款审核</a>
      </if>
    <!-- end --></div></td>
    </tr>
  </tbody>
</table>
</td>
</tr>
</volist>
            <?php }?>
            <!-- 数据主体结束 -->
            
            <?php if(!IS_AJAX){?>
          </tbody>
        </table>
        <div id="ajaxdatalistpages" class="center-block pages"></div>
      </div>
    </section>
  </div>
  <div class="col-sm-5 col-md-4 col-lg-3">
    
    <div class="panel">
      <header class="panel-heading"> 搜索订单 </header>
      <div class="panel-body">
      
      <form id="ajaxdatalistform">
      <div class="input-group m-bot15">
            <input type="text" name="keywords" class="form-control">
            <span class="input-group-btn">
            <button type="button" onClick="$('#ajaxdatalistform').trigger('submit');" class="btn btn-default"><i class="fa fa-search"></i></button>
            </span> </div>
      <div class="form-group">
      <select name="status" onChange="$('#ajaxdatalistform').trigger('submit');" id="status" class="form-control">
          <option value="">订单状态</option>
         
            <option <eq name="status" value="2">selected="selected"</eq> value="2">已付款</option>
            <option <eq name="status" value="1">selected="selected"</eq> value="1">未付款</option>
            <option <eq name="status" value="0">selected="selected"</eq> value="0">已取消</option>
            <option <eq name="status" value="6">selected="selected"</eq> value="6">退款中</option>
        </select>
      
      </div>
      
      
      <div class="form-group"><input placeholder="开始时间" class="form-control" type="text" onclick="WdatePicker();" name="stime" value="" /> 至 <input class="form-control" placeholder="结束时间" type="text" onclick="WdatePicker();" name="etime" value="" /></div>
      
        

        
      </form>
      
      
      
      
      
      
      </div>
    </div>
  </div>
</div>
<include file="Public:footer" />
<style>
    .option a.btn{margin-top:5px;}
</style>




    <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"><form action="{:U('payment')}" method="post">
      <div class="modal-dialog" role="document">
        <div class="modal-content">
          <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
            <h4 class="modal-title" id="myModalLabel">付款操作</h4>
          </div>
          <div class="modal-body">
            <label for="exampleInputName2"></label>
            <br>
            <input type="hidden" value="" id="order_id" name="order_id">
            <input type="text" class="form-control" id="exampleInputName2" name="remark" placeholder="请填写操作理由">
          </div>
          <div class="modal-footer">
            <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
            <button type="submit" class="btn btn-primary">确认</button>
          </div>
        </div>
      </div></form>  
    </div>


</body></html><?php }?>









